package com.hqq.action.state.state;

/**
 * Context
 * Created by heqianqian on 2017/3/11.
 */
public class Context {

    private State state;

    public Context(State state) {
        this.state = state;
    }

    public void method(){
        if (state.getValue().equals("state1")){
            state.method1();
        }else if(state.getValue().equals("state2")){
            state.method2();
        }
    }
}
